package com.powernode.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.powernode.domain.SysMenu;
import org.apache.ibatis.annotations.Mapper;

import java.util.Set;

@Mapper
public interface SysMenuMapper extends BaseMapper<SysMenu> {

    /**
     * 通过用户id查询用户所有的菜单权限和操作权限
     * @param userId
     * @return
     */
    Set<String> selectNavById(Long userId);

    /**
     * 通过用户id查询所有菜单权限
     * @param loginUserId
     * @return
     */
    Set<SysMenu> selectMenusByUserId(Long loginUserId);
}